class Consumables implements ConsumablesPackItem {
  constructor({
    id,
    name,
    img,
    value,
    price,
    useType,
    grade
  }: ConsumablesPackItem) {
    this.id = id;
    this.name = name;
    this.value = value;
    this.img = img;
    this.price = price;
    this.useType = useType;
    this.grade = grade;
  }
  id: number;
  name: string;
  value: number;
  img: string;
  price: number;
  useType: string;
  grade: number;

  toPackItem(count: number): PackItem {
    return {
      id: this.id,
      name: this.name,
      img: this.img,
      count,
      type: "consumables",
      price: this.price,
      isLock: false,
      grade: this.grade
    };
  }
}

export { Consumables };
